package com.wang.socket;

import com.wang.packpojo.ConHeart;
import com.wang.packpojo.ConMsg;

import com.wang.packpojo.Param;
import com.wang.pojo.Device;
import io.netty.channel.ChannelHandlerContext;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class SocketMap {


    //所有tcp SOCKET MODBUS类型  key devGId, value : device
    public static Map<String, Device> deviceMap = new ConcurrentHashMap<>();

    //已注册设备  modbus  key: ip  value:Device
    public static Map<String, ConMsg> mRegPassDeviceMap = new ConcurrentHashMap<>();
    //已注册设备   json key: ip  value:Device
    public static Map<String, ConMsg> jRegPassDeviceMap = new ConcurrentHashMap<>();
    //已注册设备   custom1 key: ip  value:Device
    public static Map<String, ConMsg> c1RegPassDeviceMap = new ConcurrentHashMap<>();

    public static Map<String, ConMsg> c2RegPassDeviceMap = new ConcurrentHashMap<>();

  /*  //已注册设备  modbus  key: devGId  value:Device
    public static Map<String,ConMsg> mRegPassDevGIdDeviceMap = new ConcurrentHashMap<>();
    //已注册设备   json key: devGId  value:Device
    public static Map<String,ConMsg> jRegPassDevGIdDeviceMap = new ConcurrentHashMap<>();*/


    //，不存在的设备
    public static Map<String, ConMsg> regFailDeviceMap = new ConcurrentHashMap<>();
    // public static Map<String, ConMsg> jProdDeviceMap = new ConcurrentHashMap<>();
    /*//注册不通过设备， 发送了注册包，但未被绑定  key: ip  value:Device
    public static Map<String, ConMsg> jRegFailDeviceMap = new ConcurrentHashMap<>();*/

    //只连接不注册的设备  key: ip  value:Device
    public static Map<String, ConMsg> notRegDeviceMap = new ConcurrentHashMap<>();

    //存储socket 传输modbus 多个设备数据 String 设备devGid  String 地址编码  String 数据
    //public static Map<String, List<Param>> mMoreDevDataMap = new ConcurrentHashMap<>();
    public static Map<String, SaveData> mMoreDevDataMap = new ConcurrentHashMap<>();
    //存储socket 传输customone 多个设备数据 String 设备devGid  String 地址编码  String 数据
    public static Map<String, List<Param>> c1MoreDevDataMap = new ConcurrentHashMap<>();


}
